package com.iring.domain.common.view;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 消费信息视图
 *
 * @author wanggan
 */
@Entity
@Table(name = "uv_consumption_info")
public class ConsumptionView implements Serializable {

    private static final long serialVersionUID = 5712375053310240678L;

    @Id
    @GeneratedValue
    @Column(name = "id")
    private Integer id;

    @Column(name = "username")
    private String username;

    @Column(name = "opttype")
    private Integer opttype;

    @Column(name = "optenname")
    private String optenname;

    @Column(name = "optcnname")
    private String optcnname;

    @Column(name = "opttime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date opttime;

    @Column(name = "optamount", precision = 10,scale = 2)
    private Double optamounts;

    @Column(name = "restamount",precision = 10,scale = 2)
    private Double restamounts;

    @Override
    public String toString() {
        return "{id:" + id + ",username:" + username + ",opttype:" + opttype + ",optenname:"
                + optenname + ",optcnname:" + optcnname + ",opttime:" + opttime + ",optamounts:"
                + optamounts + ",restamounts:" + restamounts + "}";
    }

    public Integer getId() {
        return id;
    }

    public String getUsername() {
        return username;
    }

    public Integer getOpttype() {
        return opttype;
    }

    public String getOptenname() {
        return optenname;
    }

    public String getOptcnname() {
        return optcnname;
    }

    public Date getOpttime() {
        return opttime;
    }

    public Double getOptamounts() {
        return optamounts;
    }

    public Double getRestamounts() {
        return restamounts;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setOpttype(Integer opttype) {
        this.opttype = opttype;
    }

    public void setOptenname(String optenname) {
        this.optenname = optenname;
    }

    public void setOptcnname(String optcnname) {
        this.optcnname = optcnname;
    }

    public void setOpttime(Date opttime) {
        this.opttime = opttime;
    }

    public void setOptamounts(Double optamounts) {
        this.optamounts = optamounts;
    }

    public void setRestamounts(Double restamounts) {
        this.restamounts = restamounts;
    }
}
